<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%-- <%@ page pageEncoding="UTF-8"%>	 --%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>

<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
<body>
	<s:debug></s:debug>
	<!-- 头部 -->
	<div clas="row">
		<div class="col-xs-9 ">
			<div class="row">
				<div class="col-xs-2  col-md-offset-1">
					<img src="images/logo.png" width="100" height="100" />
				</div>
				<div class="col-xs-6 ">
					<h1>唐山卓辰科服后台管理系统</h1>
				</div>
				<div class="col-xs-4 "></div>
			</div>
		</div>
		<div class="col-xs-2 ">
			<s:if test="#session.user==null">
				<a href="login.jsp" class="btn btn-primary btn-lg" role="button">登录</a>
			</s:if>
			<s:if test="#session.user==null">
				<button class="btn btn-primary btn-lg" data-toggle="modal"
					data-target="#regist">注册</button>
			</s:if>
		</div>

		<div class="col-xs-1">
			<s:if test="#session.user!=null">
				<div class="btn-group">
					<button type="button" class="btn btn-primary dropdown-toggle"
						data-toggle="dropdown">
						<s:property value="#session.user.username" />
						<span class="caret"></span>

					</button>
					<ul class="dropdown-menu" role="menu">
						<li><a href="logout.action">注销</a></li>
						<li><a href="#">另一个功能</a></li>
						<li><a href="#">其他</a></li>
						<li class="divider"></li>
						<li><a href="#">分离的链接</a></li>
					</ul>
				</div>
			</s:if>
		</div>
	</div>
	<!-- 分割线 -->
	<div class="row">
		<div class="col-xs-12">
			<hr style="height: 5px; border: none; border-top: 5px ridge green;" />
		</div>
	</div>
	<!-- 显示tab标签内容页 -->
	<div class="row">
		<div class="col-xs-12">
			<ul id="myTab" class="nav nav-tabs">
				<li class="active"><a href="#home" data-toggle="tab"> 文章列表
				</a></li>
				<li><a href="#ios" data-toggle="tab">iOS</a></li>
				<li class="dropdown"><a href="#" id="myTabDrop1"
					class="dropdown-toggle" data-toggle="dropdown">Java <b
						class="caret"></b>
				</a>
					<ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop1">
						<li><a href="#jmeter" tabindex="-1" data-toggle="tab">jmeter</a></li>
						<li><a href="#ejb" tabindex="-1" data-toggle="tab">ejb</a></li>
					</ul></li>
			</ul>
			<div id="myTabContent" class="tab-content">
				<div class="tab-pane fade in active" id="home">
					<div class="row">
						<div class="col-xs-12">
							<div class="panel panel-primary">
								<a class="btn btn-primary" href="article_add.jsp">添加文档</a>
							</div>
						</div>
					</div>
					<div class="panel panel-primary">
						<div class="panel-heading">文章列表</div>
						<div class="panel-body">
							<table class="table table-bordered">
								<caption>下面是最近文章列表</caption>
								<thead>
									<tr>
										<th>标题</th>
										<th>创建人</th>
										<th>创建时间</th>
										<th>修改人</th>
										<th>修改时间</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<s:iterator value="#session.articles" id="article">
										<tr>
											<td><s:property value="#article.title" /></td>
											<td><s:property value="#article.creator" /></td>
											<td><s:property value="#article.crateTime" /></td>
											<td><s:property value="#article.lastestEditor" /></td>
											<td><s:property value="#article.lastestEditTime" /></td>
											<td><a
												href="articleedit.action?article.id=${article.id}">修改</a> |<a
												href="articledelete.action?article.id=${article.id}">删除</a></td>
										</tr>
									</s:iterator>
								</tbody>
							</table>
						</div>
						<div class="panel-footer">面板脚注</div>
					</div>
				</div>
				<div class="tab-pane fade" id="ios">
					<p>iOS 是一个由苹果公司开发和发布的手机操作系统。最初是于 2007 年首次发布 iPhone、iPod Touch 和
						Apple TV。iOS 派生自 OS X，它们共享 Darwin 基础。OS X 操作系统是用在苹果电脑上，iOS
						是苹果的移动版本。</p>
				</div>
				<div class="tab-pane fade" id="jmeter">
					<p>jMeter 是一款开源的测试软件。它是 100% 纯 Java 应用程序，用于负载和性能测试。</p>
				</div>
				<div class="tab-pane fade" id="ejb">
					<p>Enterprise Java
						Beans（EJB）是一个创建高度可扩展性和强大企业级应用程序的开发架构，部署在兼容应用程序服务器（比如 JBOSS、Web
						Logic 等）的 J2EE 上。</p>
				</div>
			</div>
		</div>
	</div>

	<!-- 分割线 -->
	<div class="row">
		<div class="col-xs-12">
			<hr style="height: 5px; border: none; border-top: 5px ridge green;" />
		</div>
	</div>
	<jsp:include page="foot.jsp" /><!--动态包含-->
	<!-- 左侧导航 -->
	<!-- 	<div class="col-xs-2"> -->
	<!-- 		导航栏 -->

	<!-- 		<p>标签式的导航菜单</p> -->
	<!-- 		<ul class="nav nav-pills nav-stacked"> -->
	<!-- 			<li class="active"><a href="#">Home</a></li> -->
	<!-- 			<li><a href="#">SVN</a></li> -->
	<!-- 			<li><a href="#">iOS</a></li> -->
	<!-- 			<li><a href="#">VB.Net</a></li> -->
	<!-- 			<li class="dropdown"><a class="dropdown-toggle" -->
	<%-- 				data-toggle="dropdown" href="#"> Java <span class="caret"></span> --%>
	<!-- 			</a> -->
	<!-- 				<ul class="dropdown-menu"> -->
	<!-- 					<li><a href="#">省</a></li> -->
	<!-- 					<li><a href="#">市</a></li> -->
	<!-- 					<li><a href="#">区</a></li> -->
	<!-- 					<li class="divider"></li> -->
	<!-- 					<li><a href="#">分离的链接</a></li> -->
	<!-- 				</ul></li> -->
	<!-- 			<li><a href="#">PHP</a></li> -->
	<!-- 		</ul> -->
	<!-- 	</div> -->

	<!-- 内容页 -->
	<!-- 	<div class="col-xs-10"> -->
	<!-- 		<div class="row"> -->
	<!-- 			<div class="panel panel-default"> -->
	<!-- 				<a href="#">添加</a> -->
	<!-- 			</div> -->
	<!-- 		</div> -->
	<!-- 		<div class="panel panel-primary"> -->
	<!-- 			<div class="panel-heading">标题</div> -->
	<!-- 			<div class="panel-body"> -->
	<!-- 				<table class="table table-bordered"> -->
	<!-- 					<caption>精简表格布局</caption> -->
	<!-- 					<thead> -->
	<!-- 						<tr> -->
	<!-- 							<th>名称</th> -->
	<!-- 							<th>城市</th> -->
	<!-- 							<th>邮编</th> -->
	<!-- 							<th>操作</th> -->
	<!-- 						</tr> -->
	<!-- 					</thead> -->
	<!-- 					<tbody> -->
	<!-- 						<tr> -->
	<!-- 							<td>Tanmay</td> -->
	<!-- 							<td>Bangalore</td> -->
	<!-- 							<td>560001</td> -->
	<!-- 							<td><a href="UEditor_edit.html">修改</a> <a href="#">删除</a></td> -->
	<!-- 						</tr> -->
	<!-- 						<tr> -->
	<!-- 							<td>Sachin</td> -->
	<!-- 							<td>Mumbai</td> -->
	<!-- 							<td>400003</td> -->
	<!-- 							<td><a href="markdown_edit.html">修改</a> <a href="#">删除</a></td> -->
	<!-- 						</tr> -->
	<!-- 						<tr> -->
	<!-- 							<td>Uma</td> -->
	<!-- 							<td>Pune</td> -->
	<!-- 							<td>411027</td> -->
	<!-- 							<td><a href="edit.html">修改</a> <a href="#">删除</a></td> -->
	<!-- 						</tr> -->
	<!-- 					</tbody> -->
	<!-- 				</table> -->
	<!-- 			</div> -->
	<!-- 			<div class="panel-footer">面板脚注</div> -->
	<!-- 		</div> -->
	<!-- 	</div> -->
	<!-- 	<div class="row"></div> -->

	<!-- 模态框（Modal） -->
	<div class="modal fade" id="login" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">用户登录</h4>
				</div>
				<div class="modal-body">
					<s:fielderror></s:fielderror>
					<s:form action="userAction!login" method="post" validate="true">
						<s:textfield id="username" name="username" label="用户名"
							required="true"></s:textfield>
						<s:password id="password" name="password" label="密码"
							required="true"></s:password>
						<s:submit key="submit" value="登录"></s:submit>
					</s:form>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal -->
		<!-- /.modal -->
</body>
</html>